<!-- HTML header for doxygen 1.8.20-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
	<meta http-equiv="X-UA-Compatible" content="IE=9"/>
	<meta name="generator" content="Doxygen 1.9.4"/>
	<meta name="viewport" content="width=device-width, initial-scale=1"/>
	<title>Raspberry Pi Pico SDK: include/hardware/sha256.h File Reference</title>
	<!-- <link href="tabs.css" rel="stylesheet" type="text/css"/> -->
	<script type="text/javascript" src="jquery.js"></script>
	<script type="text/javascript" src="dynsections.js"></script>
	<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
	<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
	<link href="doxygen.css" rel="stylesheet" type="text/css" />
	<link href="normalise.css" rel="stylesheet" type="text/css"/>
<link href="main.css" rel="stylesheet" type="text/css"/>
<link href="styles.css" rel="stylesheet" type="text/css"/>
</head>
<body>
	<div class="navigation-mobile">
		<div class="logo--mobile">
			<a href="/"><img src="logo-mobile.svg" alt="Raspberry Pi"></a>
		</div>
		<div class="navigation-toggle">
			<span class="line-1"></span>
			<span class="line-2">
				<p>Menu Toggle</p>
			</span>
			<span class="line-3"></span>
		</div>
	</div>
	<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
		<div class="logo">
			<a href="index.html"> <img src="logo.svg" alt="Raspberry Pi"></a>
			<span style="display: inline-block; margin-top: 10px;">
				v2.0.0
			</span>
		</div>
		<div class="navigation-footer">
			<img src="logo-mobile.svg" alt="Raspberry Pi">
			<a href="https://www.raspberrypi.com/" target="_blank">By Raspberry Pi Ltd</a>
		</div>
<!-- 		<div class="search">
			<form>
				<input type="search" name="search" id="search" placeholder="Search">
				<input type="submit" value="Search">
			</form>
		</div> -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('rp2__common_2hardware__sha256_2include_2hardware_2sha256_8h.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle"><div class="title">sha256.h File Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="pico_8h_source.html">pico.h</a>&quot;</code><br />
<code>#include &quot;hardware/structs/sha256.h&quot;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for sha256.h:</div>
<div class="dyncontent">
<div class="center"><img src="rp2__common_2hardware__sha256_2include_2hardware_2sha256_8h__incl.png" border="0" usemap="#ainclude_2hardware_2sha256_8h" alt=""/></div>
<map name="ainclude_2hardware_2sha256_8h" id="ainclude_2hardware_2sha256_8h">
<area shape="rect" title=" " alt="" coords="651,5,849,32"/>
<area shape="rect" href="pico_8h.html" title=" " alt="" coords="649,229,710,256"/>
<area shape="rect" href="rp2350_2hardware__structs_2include_2hardware_2structs_2sha256_8h_source.html" title=" " alt="" coords="725,80,919,107"/>
<area shape="rect" href="common_2pico__base__headers_2include_2pico_2types_8h_source.html" title=" " alt="" coords="158,453,259,480"/>
<area shape="rect" title=" " alt="" coords="420,304,533,331"/>
<area shape="rect" href="common_2pico__base__headers_2include_2pico_2config_8h_source.html" title=" " alt="" coords="558,304,662,331"/>
<area shape="rect" href="platform_8h.html" title=" " alt="" coords="687,304,808,331"/>
<area shape="rect" href="error_8h_source.html" title=" " alt="" coords="832,304,927,331"/>
<area shape="rect" href="assert_8h_source.html" title=" " alt="" coords="5,528,111,555"/>
<area shape="rect" title=" " alt="" coords="74,603,157,629"/>
<area shape="rect" title=" " alt="" coords="211,528,281,555"/>
<area shape="rect" title=" " alt="" coords="306,528,381,555"/>
<area shape="rect" title=" " alt="" coords="173,379,337,405"/>
<area shape="rect" href="compiler_8h_source.html" title=" " alt="" coords="362,379,543,405"/>
<area shape="rect" href="sections_8h_source.html" title=" " alt="" coords="567,379,746,405"/>
<area shape="rect" href="panic_8h_source.html" title=" " alt="" coords="770,379,930,405"/>
<area shape="rect" title=" " alt="" coords="1130,379,1341,405"/>
<area shape="rect" title=" " alt="" coords="955,379,1105,405"/>
<area shape="rect" title=" " alt="" coords="357,453,548,480"/>
<area shape="rect" href="address__mapped_8h.html" title=" " alt="" coords="717,155,927,181"/>
<area shape="rect" title=" " alt="" coords="951,155,1130,181"/>
</map>
</div>
</div><div class="textblock"><div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dyncontent">
<div class="center"><img src="rp2__common_2hardware__sha256_2include_2hardware_2sha256_8h__dep__incl.png" border="0" usemap="#ainclude_2hardware_2sha256_8hdep" alt=""/></div>
<map name="ainclude_2hardware_2sha256_8hdep" id="ainclude_2hardware_2sha256_8hdep">
<area shape="rect" title=" " alt="" coords="5,5,203,32"/>
<area shape="rect" href="rp2__common_2pico__sha256_2include_2pico_2sha256_8h.html" title=" " alt="" coords="23,80,185,107"/>
</map>
</div>
</div>
<p><a href="rp2__common_2hardware__sha256_2include_2hardware_2sha256_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">union &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="unionsha256__result__t.html">sha256_result_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">SHA-256 result generated by the API.  <a href="unionsha256__result__t.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a36bd0fcbf902a31563cc3b187191ac49"><td class="memItemLeft" align="right" valign="top"><a id="a36bd0fcbf902a31563cc3b187191ac49" name="a36bd0fcbf902a31563cc3b187191ac49"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>PARAM_ASSERTIONS_ENABLED_HARDWARE_SHA256</b>&#160;&#160;&#160;0</td></tr>
<tr class="separator:a36bd0fcbf902a31563cc3b187191ac49"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga08a18381a4c5a7c9f7d0d1b6550621a3"><td class="memItemLeft" align="right" valign="top">
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SHA256_RESULT_BYTES</b>&#160;&#160;&#160;32</td></tr>
<tr class="memdesc:ga08a18381a4c5a7c9f7d0d1b6550621a3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Size of a sha256 result in bytes. <br /></td></tr>
<tr class="separator:ga08a18381a4c5a7c9f7d0d1b6550621a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="enum-members" name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:gaaf3089af3667088256de5d352973d5e6"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__sha256.html#gaaf3089af3667088256de5d352973d5e6">sha256_endianness</a> { <a class="el" href="group__hardware__sha256.html#ggaaf3089af3667088256de5d352973d5e6af7be52b37d04b7ffbd9ba69ba6cad8fd">SHA256_LITTLE_ENDIAN</a>
, <a class="el" href="group__hardware__sha256.html#ggaaf3089af3667088256de5d352973d5e6a9ed40fa208beaabfc2fc5b8edbd652c1">SHA256_BIG_ENDIAN</a>
 }</td></tr>
<tr class="memdesc:gaaf3089af3667088256de5d352973d5e6"><td class="mdescLeft">&#160;</td><td class="mdescRight">SHA-256 endianness definition used in the API.  <a href="group__hardware__sha256.html#gaaf3089af3667088256de5d352973d5e6">More...</a><br /></td></tr>
<tr class="separator:gaaf3089af3667088256de5d352973d5e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga4f35e6d85d8991216e9c1edd7e682cc7"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__sha256.html#ga4f35e6d85d8991216e9c1edd7e682cc7">sha256_set_dma_size</a> (uint size_in_bytes)</td></tr>
<tr class="memdesc:ga4f35e6d85d8991216e9c1edd7e682cc7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configure the correct DMA data size.  <a href="group__hardware__sha256.html#ga4f35e6d85d8991216e9c1edd7e682cc7">More...</a><br /></td></tr>
<tr class="separator:ga4f35e6d85d8991216e9c1edd7e682cc7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga21bca5a93ccad014cc890e734c9436eb"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__sha256.html#ga21bca5a93ccad014cc890e734c9436eb">sha256_set_bswap</a> (bool swap)</td></tr>
<tr class="memdesc:ga21bca5a93ccad014cc890e734c9436eb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable or disable byte swapping of 32-bit values.  <a href="group__hardware__sha256.html#ga21bca5a93ccad014cc890e734c9436eb">More...</a><br /></td></tr>
<tr class="separator:ga21bca5a93ccad014cc890e734c9436eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga327d4bf2af7a8291cc402c569392b4d7"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__sha256.html#ga327d4bf2af7a8291cc402c569392b4d7">sha256_start</a> (void)</td></tr>
<tr class="memdesc:ga327d4bf2af7a8291cc402c569392b4d7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Prepare the hardware for a new checksum.  <a href="group__hardware__sha256.html#ga327d4bf2af7a8291cc402c569392b4d7">More...</a><br /></td></tr>
<tr class="separator:ga327d4bf2af7a8291cc402c569392b4d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7e4f6ab4a7738c38d094ecd4c5ee9839"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__sha256.html#ga7e4f6ab4a7738c38d094ecd4c5ee9839">sha256_is_sum_valid</a> (void)</td></tr>
<tr class="memdesc:ga7e4f6ab4a7738c38d094ecd4c5ee9839"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if a valid checksum has been calculated.  <a href="group__hardware__sha256.html#ga7e4f6ab4a7738c38d094ecd4c5ee9839">More...</a><br /></td></tr>
<tr class="separator:ga7e4f6ab4a7738c38d094ecd4c5ee9839"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga586dc580abe393a0eb4af052da4f9050"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__sha256.html#ga586dc580abe393a0eb4af052da4f9050">sha256_is_ready</a> (void)</td></tr>
<tr class="memdesc:ga586dc580abe393a0eb4af052da4f9050"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if a the hardware is ready to accept more data.  <a href="group__hardware__sha256.html#ga586dc580abe393a0eb4af052da4f9050">More...</a><br /></td></tr>
<tr class="separator:ga586dc580abe393a0eb4af052da4f9050"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga98114068a397971354cd24ae75d051a6"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__sha256.html#ga98114068a397971354cd24ae75d051a6">sha256_wait_valid_blocking</a> (void)</td></tr>
<tr class="memdesc:ga98114068a397971354cd24ae75d051a6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Wait until the checksum is valid.  <a href="group__hardware__sha256.html#ga98114068a397971354cd24ae75d051a6">More...</a><br /></td></tr>
<tr class="separator:ga98114068a397971354cd24ae75d051a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaab29e83e6d914d262e9aaf13ed34f06e"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__sha256.html#gaab29e83e6d914d262e9aaf13ed34f06e">sha256_wait_ready_blocking</a> (void)</td></tr>
<tr class="memdesc:gaab29e83e6d914d262e9aaf13ed34f06e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Wait until the hardware is ready to accept more data.  <a href="group__hardware__sha256.html#gaab29e83e6d914d262e9aaf13ed34f06e">More...</a><br /></td></tr>
<tr class="separator:gaab29e83e6d914d262e9aaf13ed34f06e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga065f30a83c4d96ea85712a0e22f7a62e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__sha256.html#ga065f30a83c4d96ea85712a0e22f7a62e">sha256_get_result</a> (<a class="el" href="unionsha256__result__t.html">sha256_result_t</a> *out, enum <a class="el" href="group__hardware__sha256.html#gaaf3089af3667088256de5d352973d5e6">sha256_endianness</a> endianness)</td></tr>
<tr class="memdesc:ga065f30a83c4d96ea85712a0e22f7a62e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the checksum result.  <a href="group__hardware__sha256.html#ga065f30a83c4d96ea85712a0e22f7a62e">More...</a><br /></td></tr>
<tr class="separator:ga065f30a83c4d96ea85712a0e22f7a62e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab26b08aabc454e46859d38acdb9afb63"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__sha256.html#gab26b08aabc454e46859d38acdb9afb63">sha256_err_not_ready</a> (void)</td></tr>
<tr class="memdesc:gab26b08aabc454e46859d38acdb9afb63"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if data was written before the hardware was ready.  <a href="group__hardware__sha256.html#gab26b08aabc454e46859d38acdb9afb63">More...</a><br /></td></tr>
<tr class="separator:gab26b08aabc454e46859d38acdb9afb63"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaccd81a57687cf83726d87b5da4e63551"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__sha256.html#gaccd81a57687cf83726d87b5da4e63551">sha256_err_not_ready_clear</a> (void)</td></tr>
<tr class="memdesc:gaccd81a57687cf83726d87b5da4e63551"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clear the "not ready" error condition.  <a href="group__hardware__sha256.html#gaccd81a57687cf83726d87b5da4e63551">More...</a><br /></td></tr>
<tr class="separator:gaccd81a57687cf83726d87b5da4e63551"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac7b585e60910cf0e1d927a0824cd0fe1"><td class="memItemLeft" align="right" valign="top">static volatile void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__sha256.html#gac7b585e60910cf0e1d927a0824cd0fe1">sha256_get_write_addr</a> (void)</td></tr>
<tr class="memdesc:gac7b585e60910cf0e1d927a0824cd0fe1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Address to write the data to be hashed.  <a href="group__hardware__sha256.html#gac7b585e60910cf0e1d927a0824cd0fe1">More...</a><br /></td></tr>
<tr class="separator:gac7b585e60910cf0e1d927a0824cd0fe1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7d391fa299a4e4f91c591c2e27c82295"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__sha256.html#ga7d391fa299a4e4f91c591c2e27c82295">sha256_put_word</a> (uint32_t word)</td></tr>
<tr class="memdesc:ga7d391fa299a4e4f91c591c2e27c82295"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write one 32bit word of data to the SHA-256 hardware.  <a href="group__hardware__sha256.html#ga7d391fa299a4e4f91c591c2e27c82295">More...</a><br /></td></tr>
<tr class="separator:ga7d391fa299a4e4f91c591c2e27c82295"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa78f58e44c56c61c3e24c119923f28d4"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__hardware__sha256.html#gaa78f58e44c56c61c3e24c119923f28d4">sha256_put_byte</a> (uint8_t b)</td></tr>
<tr class="memdesc:gaa78f58e44c56c61c3e24c119923f28d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write one byte of data to the SHA-256 hardware.  <a href="group__hardware__sha256.html#gaa78f58e44c56c61c3e24c119923f28d4">More...</a><br /></td></tr>
<tr class="separator:gaa78f58e44c56c61c3e24c119923f28d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</div><!-- contents -->
</div><!-- doc-content -->

	<script src="main.js"></script>
</body>
</html>
